package com.pagepub.expo.services;

import javax.servlet.http.HttpSession;

import org.openamf.RequestContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

public abstract class AbstractAMFService {

	/**
	 * get JavaBean in Spring
	 * @param name
	 * @return
	 */
	public Object getBean(String name) {
		return WebApplicationContextUtils
		.getWebApplicationContext(RequestContext.getServletContext()).getBean(name);
	}

	
	/**
	 * get Servlet Session
	 * @return
	 */
	public HttpSession getSession() {
		return RequestContext.getHttpSession();
	}
	
}
